// Action 创建函数 - 返回 action 对象
 
export const loginAction = () => ({
  type: "user/login",
  payload: { id: "123", name: "张三" },
});
 
export const addAction = () => ({
  type: "cart/addItem",
  payload: "笔记本电脑",
});
 
export const logoutAction = () => ({
  type: "user/logout",
});
 
export const clearAction = () => ({
  type: "cart/clear",
});
 